import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '账期ID',
    align: "center",
    dataIndex: 'accountPeriodId'
  },
  {
    title: '项目',
    align: "center",
    dataIndex: 'reportItem'
  },
  {
    title: '项目分组',
    align: "center",
    dataIndex: 'reportItemGroup'
  },
  {
    title: '期初未收款/上期结存数',
    align: "center",
    dataIndex: 'openingBalance'
  },
  {
    title: '本期应收/收入数',
    align: "center",
    dataIndex: 'currentPeriodReceivable'
  },
  {
    title: '本期已收数/本期付出款',
    align: "center",
    dataIndex: 'currentPeriodReceived'
  },
  {
    title: '期末未收款/余额',
    align: "center",
    dataIndex: 'endBalance'
  },
  {
    title: '已收现金',
    align: "center",
    dataIndex: 'receivedXj'
  },
  {
    title: '已收App线上支付',
    align: "center",
    dataIndex: 'receivedAppxszf'
  },
  {
    title: '已收扫码支付',
    align: "center",
    dataIndex: 'receivedSmzf'
  },
  {
    title: '已收电汇',
    align: "center",
    dataIndex: 'receivedDh'
  },
  {
    title: '已收预售划款',
    align: "center",
    dataIndex: 'receivedYshk'
  },
  {
    title: '已收其他',
    align: "center",
    dataIndex: 'receivedQt'
  },
  {
    title: '创建人',
    align: "center",
    dataIndex: 'createBy'
  },
  {
    title: '创建日期',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '展示顺序',
    align: "center",
    dataIndex: 'showOrder'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '账期ID',
    field: 'accountPeriodId',
    component: 'Input',
  },
  {
    label: '项目',
    field: 'reportItem',
    component: 'Input',
  },
  {
    label: '项目分组',
    field: 'reportItemGroup',
    component: 'Input',
  },
  {
    label: '期初未收款/上期结存数',
    field: 'openingBalance',
    component: 'Input',
  },
  {
    label: '本期应收/收入数',
    field: 'currentPeriodReceivable',
    component: 'Input',
  },
  {
    label: '本期已收数/本期付出款',
    field: 'currentPeriodReceived',
    component: 'Input',
  },
  {
    label: '期末未收款/余额',
    field: 'endBalance',
    component: 'Input',
  },
  {
    label: '已收现金',
    field: 'receivedXj',
    component: 'Input',
  },
  {
    label: '已收App线上支付',
    field: 'receivedAppxszf',
    component: 'Input',
  },
  {
    label: '已收扫码支付',
    field: 'receivedSmzf',
    component: 'Input',
  },
  {
    label: '已收电汇',
    field: 'receivedDh',
    component: 'Input',
  },
  {
    label: '已收预售划款',
    field: 'receivedYshk',
    component: 'Input',
  },
  {
    label: '已收其他',
    field: 'receivedQt',
    component: 'Input',
  },
  {
    label: '展示顺序',
    field: 'showOrder',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  accountPeriodId: {title: '账期ID',order: 0,view: 'text', type: 'string',},
  reportItem: {title: '项目',order: 1,view: 'text', type: 'string',},
  reportItemGroup: {title: '项目分组',order: 2,view: 'text', type: 'string',},
  openingBalance: {title: '期初未收款/上期结存数',order: 3,view: 'text', type: 'string',},
  currentPeriodReceivable: {title: '本期应收/收入数',order: 4,view: 'text', type: 'string',},
  currentPeriodReceived: {title: '本期已收数/本期付出款',order: 5,view: 'text', type: 'string',},
  endBalance: {title: '期末未收款/余额',order: 6,view: 'text', type: 'string',},
  receivedXj: {title: '已收现金',order: 7,view: 'text', type: 'string',},
  receivedAppxszf: {title: '已收App线上支付',order: 8,view: 'text', type: 'string',},
  receivedSmzf: {title: '已收扫码支付',order: 9,view: 'text', type: 'string',},
  receivedDh: {title: '已收电汇',order: 10,view: 'text', type: 'string',},
  receivedYshk: {title: '已收预售划款',order: 11,view: 'text', type: 'string',},
  receivedQt: {title: '已收其他',order: 12,view: 'text', type: 'string',},
  createBy: {title: '创建人',order: 13,view: 'text', type: 'string',},
  createTime: {title: '创建日期',order: 14,view: 'datetime', type: 'string',},
  showOrder: {title: '展示顺序',order: 15,view: 'text', type: 'string',},
  remark: {title: '备注',order: 16,view: 'text', type: 'string',},
};
